package com.yby.dome8;

import java.util.Scanner;

/**
 * 球员类
 */
public class Player {
    String name;
    public void players(){
        Scanner scanner = new Scanner(System.in);
        Player[] players = new Player[11];
        for (int i = 0; i < 11; i++) {   //利用for循环创建对象
            players[i] = new Player();
            players[i].name = scanner.next();
            System.out.println("创建对象成功 "+players[i].name+","+(i+1));
        }
    }
}
